Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Utility for getting an assemble view from a collection object.
Install with npm:
$ npm install --save get-view
Should work with any collection of vinyl files.
var getView = require('get-view');
templates example
Given the following setup code, all of the below examples would return a page
from the app.views.pages
collection:
var templates = require('templates');
app = templates();
app.create('page');
app.page('foo', {content: 'this is foo'});
app.page('bar.md', {content: 'this is bar'});
app.page('a/b/c/baz.md', {content: 'this is baz', base: 'a'});
app.page('test/fixtures/templates/a.tmpl');
Get a view by customizing the lookup key with a function:
var view = getView('foo.md', app.views.pages, function(key) {
return path.basename(key, path.extname(key));
});
//=> <Page "foo" <Buffer 74 68 69 73 20 69>>
Get a view by view.path
var view = getView('a/b/c/baz.md', app.views.pages);
//=> <Page "b/c/baz.md" <Buffer 74 68 69 73>>
Get a view by view.basename
var view = getView('baz.md', app.views.pages);
//=> <Page "b/c/baz.md" <Buffer 74 68 69 73>>
Get a view by view.filename
var view = getView('baz', app.views.pages);
//=> <Page "b/c/baz.md" <Buffer 74 68 69 73>>
Get a view by view.relative
var view = getView('b/c/baz.md', app.views.pages);
//=> <Page "b/c/baz.md" <Buffer 74 68 69 73>>
name
matches any of the path properties on a vinyl… more | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. MIT
This file was generated by verb-generate-readme, v0.4.2, on February 01, 2017.
FAQs
Utility for getting an assemble view from a collection object.
The npm package get-view receives a total of 25,164 weekly downloads. As such, get-view popularity was classified as popular.
We found that get-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.